package com.aabte.design2.behavioral.command;

/**
 * 复制命令不会被保存到历史记录中，因为它没有改变编辑器的状态
 *
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class CopyCommand extends AbstractCommand {
    public CopyCommand(Application app, Editor editor) {
        super(app, editor);
    }

    @Override
    public boolean execute() {
        getApp().setClipboard(getEditor().getSelection());
        return false;
    }
}
